package com.huantai.common.consts;

import org.apache.commons.lang3.time.FastDateFormat;

/**
 * FastDateFormat实现Date的parse()与format()时， 常用pattern定义，及其对应的FastDateFormat定义
 * 
 * @author Ma Chao
 * @version 2018年6月9日 上午10:54:12
 */
public final class DateTimeFormat {
    private DateTimeFormat() {}

    /** 常用pattern定义 */
    public final class Pattern {
        private Pattern() {}

        /** "yyMM" */
        public static final String YYMM = "yyMM";
        /** "yyMMdd" */
        public static final String YYMMDD = "yyMMdd";
        /** "yyyyMM" */
        public static final String YYYYMM = "yyyyMM";
        /** "yyyyMMdd" */
        public static final String YYYYMMDD = "yyyyMMdd";
        /** "yyMMddHHmmss" */
        public static final String YYMMDDHHMMSS = "yyMMddHHmmss";
        /** "yyyyMMddHHmmss" */
        public static final String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
        /** "yy-MM" */
        public static final String YY_MM = "yy-MM";
        /** "yy-MM-dd" */
        public static final String YY_MM_DD = "yy-MM-dd";
        /** "yyyy-MM" */
        public static final String YYYY_MM = "yyyy-MM";
        /** "yyyy-MM-dd" */
        public static final String YYYY_MM_DD = "yyyy-MM-dd";
        /** "yy-MM-dd HH:mm:ss" */
        public static final String YY_MM_DD_HH_MM_SS = "yy-MM-dd HH:mm:ss";
        /** "yyyy-MM-dd HH:mm:ss" */
        public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
        /** "yyyy-MM-dd HH:mm:ss.SSS" */
        public static final String YYYY_MM_DD_HH_MM_SS_SSS = "yyyy-MM-dd HH:mm:ss.SSS";
        /** "yyyy-MM-dd'T'HH:mm:ssZZ" */
        public static final String YYYY_MM_DD_T_HH_MM_SS_ZZ = "yyyy-MM-dd'T'HH:mm:ssZZ";
        /** "yyyy-MM-dd'T'HH:mm:ss.SSSZZ" */
        public static final String YYYY_MM_DD_T_HH_MM_SS_SSS_ZZ = "yyyy-MM-dd'T'HH:mm:ss.SSSZZ";
        /** "yy年MM月" */
        public static final String YY_MM_CN = "yy年MM月";
        /** "yy年MM月dd日" */
        public static final String YY_MM_DD_CN = "yy年MM月dd日";
        /** "yyyy年MM月" */
        public static final String YYYY_MM_CN = "yyyy年MM月";
        /** "yyyy年MM月dd日" */
        public static final String YYYY_MM_DD_CN = "yyyy年MM月dd日";
        /** "yy年MM月dd日HH时mm分ss秒" */
        public static final String YY_MM_DD_HH_MM_SS_CN = "yy年MM月dd日HH时mm分ss秒";
        /** "yyyy年MM月dd日HH时mm分ss秒" */
        public static final String YYYY_MM_DD_HH_MM_SS_CN = "yyyy年MM月dd日HH时mm分ss秒";
    }

    /** 可以直接处理<code>"yyyy-MM-dd"</code>格式的FORMAT */
    public static final FastDateFormat FORMAT_YYYY_MM_DD =
            FastDateFormat.getInstance(Pattern.YYYY_MM_DD);
    /** 可以直接处理<code>"yyyy年MM月dd日"</code>格式的FORMAT */
    public static final FastDateFormat FORMAT_YYYY_MM_DD_CN =
            FastDateFormat.getInstance(Pattern.YYYY_MM_DD_CN);
    /** 可以直接处理<code>"yyyy-MM-dd HH:mm:ss"</code>格式的FORMAT */
    public static final FastDateFormat FORMAT_YYYY_MM_DD_HH_MM_SS =
            FastDateFormat.getInstance(Pattern.YYYY_MM_DD_HH_MM_SS);
    /** 可以直接处理<code>"yyyy年MM月dd日HH时mm分ss秒"</code>格式的FORMAT */
    public static final FastDateFormat FORMAT_YYYY_MM_DD_HH_MM_SS_CN =
            FastDateFormat.getInstance(Pattern.YYYY_MM_DD_HH_MM_SS_CN);

}
